#ifndef PSD_OPTIMIZE_H
#define PSD_OPTIMIZE_H

#include "queue.h"

#include "psd_session.h"
#include "psd_conn.h"
#include "psd_settings.h"

typedef struct psd_optimizer_t {
	LIST_ENTRY(psd_optimizer_t) list;
	char *name;
	int priority;
	int (*optimize) (const psdSess *sess, const char *depot_id, psdSettings *settings);
} psdOptimizer;


int psd_optimizers_init();
psdOptimizer *psd_get_optimizer(const char *name);
int psd_add_optimizer(psdOptimizer *optimizer);
int psd_run_optimizers(const psdSess *sess, const char *depot_id, psdSettings *settings);

#endif
